Assets 您所在的位置:网站首页 Assets VuePress Assets

Assets

2024-07-04 22:44| 来源: 网络整理| 查看: 265

# Assets# Relative URLs

You can reference any assets using relative URLs in your Markdown content:

![An image](./image.png)

This is generally the suggested way to import images, as users usually place images near the Markdown file that references them.

# Public Files

You can put some static assets inside public directory, and they will be copied to the root of the generated directory.

The default public directory is .vuepress/public, which can be changed by public option.

It would be useful in some cases:

You may need to provide static assets that are not directly referenced in any of your Markdown files, for example, favicon and PWA icons.You may need to serve some shared static assets, which may even be referenced outside your site, for example, logo images.You may want to reference images using absolute URLs in your Markdown content.

Take our documentation source files as an example, we are putting the logo of VuePress inside the public directory:

└─ docs ├─ .vuepress | └─ public | └─ images | └─ hero.png #


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有